package ControlLayer;
import ModelLayer.*;
import java.util.ArrayList;


/**
 * Write a description of class LoanCtr here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class LoanCtr
{
    // instance variables - replace the example below with your own

    /**
     * Constructor for objects of class LoanCtr
     */
    public LoanCtr()
    {
        
    }
    
    public Loan findLoan(long id)
    {
        return LoanRegister.getInstance().findLoan(id);
    }
    
    public void printLoan(long id)
    {
        LoanRegister.getInstance().printLoan(id);
    }
    
    public boolean createLoan(long loanId, long personId, long dvdId, String borrowDate, String period) 
    {
       return LoanRegister.getInstance().createLoan(loanId,personId,dvdId,borrowDate,period);    
    }
    
    public boolean removeLoan(long id)
    {
        return LoanRegister.getInstance().removeLoan(id);
    }
    
    public void listAllLoans()
    {
        LoanRegister.getInstance().listAllLoans();
    }
    
    public boolean updateLoanPeriod(long id, String period)
    {
        return LoanRegister.getInstance().updateLoanPeriod(id, period);
    }
    
    public boolean updateLoanState(long id, String state)
    {
        return LoanRegister.getInstance().updateLoanState(id, state);
    }
    
    public boolean updateLoanBorrowDate(long id, String date)
    {
        return LoanRegister.getInstance().updateLoanBorrowDate(id, date);
    }
    
    
    public void returnCopy(long id)
    {
        LoanRegister.getInstance().returnCopy(id);
    }
    
    

    
}
